package com.engiu.test.client.dialog;

import com.engiu.test.client.ProgressBar;
import com.engiu.test.client.dialog.PopupProgressBar.PopupProgressBarUiBinder;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;

public class NoCaptionProgressBar extends Composite implements ProgressBarInterface {

	private static NoCaptionProgressBarUiBinder uiBinder = GWT
			.create(NoCaptionProgressBarUiBinder.class);

	interface NoCaptionProgressBarUiBinder extends
			UiBinder<Widget, NoCaptionProgressBar> {
	}
	

	@UiField
	ProgressBar progressBar3;
	@UiField
	Button okButton;
	@UiField
	DialogBox dialogBox;
	@UiField
	VerticalPanel vpanel;
	

	public NoCaptionProgressBar() {
		initWidget(uiBinder.createAndBindUi(this));
		dialogBox.setAnimationEnabled(true);
		dialogBox.setAutoHideEnabled(false);
		dialogBox.setModal(false);

		progressBar3.setTextVisible(false);
		progressBar3.setWidth("95%");
	}

	@Override
	public void show() {
		dialogBox.show();		
	}

	@Override
	public ProgressBar getProgressBar() {
		return progressBar3;
	}
	
	@UiHandler("okButton")
	void handleClick(ClickEvent e) {
		dialogBox.hide();
	}
}
